Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 17, 2026

Users can now wrap text in asterisks to instruct the AI to perform actions. Input like *you decide to tell a story* is transformed into "You decide to tell a story." before being sent to the AI, allowing users to prompt character behaviors directly.

Implementation

  • Added TransformAsteriskActions() method with compiled regex \*([^*]+)\* for pattern matching
  • Integrated transformation into ChatAsync() and GenerateRandomDialogAsync()
  • Transformation removes asterisks, capitalizes first letter, adds punctuation if missing
  • Handles edge cases: single characters, empty strings, multiple actions per message

Example transformations

*you wave* → "You wave."
Hello *you smile* how are you? → "Hello You smile. how are you?"
*a* → "A."

Documentation

  • Added user-facing examples to README.md
  • Added Pipeline protocol documentation for external integrations

Performance

  • Uses RegexOptions.Compiled for frequently-called chat operations
  • Optimized with StringBuilder.Append(string, int, int) overloads
Original prompt

Force the AI to take asterisk prompts as actions. So for example the AI would treat you decide to tell a story about- as the character deciding to do it.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 4 commits January 17, 2026 00:18
Co-authored-by: ExtCan <60326708+ExtCan@users.noreply.github.com>
Co-authored-by: ExtCan <60326708+ExtCan@users.noreply.github.com>
Co-authored-by: ExtCan <60326708+ExtCan@users.noreply.github.com>
…ified logic

Co-authored-by: ExtCan <60326708+ExtCan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for asterisk prompts as actions Add asterisk action prompt transformation for AI interactions Jan 17, 2026
Copilot AI requested a review from ExtCan January 17, 2026 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants